home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak Vol A-4
/
(Vol A-4) Vol. A4.iso
/
Games
/
smashing.swf
/
scripts
/
DefineSprite_62_mcBonus
/
frame_10
/
DoAction.as
Wrap
Text File
|
2008-03-12
|
3KB
|
89 lines
brickSmashed = true;
if(!expired)
{
if(pointsWorth == "PORTAL")
{
_parent.sndTeleport();
_parent._parent.sndTeleport();
ball._x = _parent.portal._x;
ball._y = _parent.portal._y;
ball.TargetX = _parent.portal._x;
ball.TargetY = _parent.portal._y;
ball.testMoveX = _parent.portal._x;
ball.testMoveY = _parent.portal._y;
ball.testMoveXTemp = _parent.portal._x;
ball.testMoveYTemp = _parent.portal._y;
_parent.portal.gotoAndPlay("out");
}
else if(pointsWorth == "SPEEDBALL")
{
_parent.sndRicochet.start();
while(_root.makePositive(ball.SpeedX,true) < _root.maxSpeed && _root.makePositive(ball.SpeedY,true) < _root.maxSpeed)
{
if(ball.SpeedX >= 0)
{
ball.SpeedX = ball.SpeedX + 1;
}
else
{
ball.SpeedX--;
}
if(ball.SpeedY >= 0)
{
ball.SpeedY = ball.SpeedY + 1;
}
else
{
ball.SpeedY--;
}
}
}
else if(pointsWorth == "MULTIBALL")
{
_parent._parent.generateBall(false,ball._x,ball._y);
_parent._parent.generateBall(false,ball._x,ball._y);
}
else if(pointsWorth == "SLOWBALL")
{
_parent.sndSlowball.start();
ball.SpeedX /= 2;
ball.SpeedY /= 2;
}
else if(pointsWorth == "POWERBALL")
{
_parent.sndPowerball.start();
ball.powerBall = true;
ball.goldenBall = false;
ball.ball.gotoAndStop("power");
}
else if(pointsWorth == "GOLDEN BALL")
{
ball.goldenBall = true;
ball.powerBall = false;
ball.ball.gotoAndStop("golden");
}
else if(pointsWorth == "INVISIBLE")
{
_parent.sndInvisible.start();
ball.goldenBall = false;
ball.powerBall = false;
ball.ball.gotoAndPlay("invisible");
}
else if(pointsWorth == "T.N.T.")
{
_root.clipCounter = _root.clipCounter + 1;
_root.attachMovie("mcExplosion","mcExplosion" + _root.clipCounter,_root.clipCounter);
x = eval(_target);
y = eval(_target);
_root["mcExplosion" + _root.clipCounter]._x = x._x;
_root["mcExplosion" + _root.clipCounter]._y = y._y;
_root["mcExplosion" + _root.clipCounter]._rotation = random(360);
}
else if(0 < pointsWorth)
{
_parent.sndPop.start();
}
}
_width = _width - _width / 7;
_height = _height - _height / 7;